﻿namespace WMS.FC.Domain.PersistenceObject.System
{
    public class UserPO : POBase
    {
        /// <summary>
        /// 用户姓名
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 用户账号
        /// </summary>
        public string Account { get; set; } = string.Empty;

        /// <summary>
        /// 用户密码
        /// </summary>
        public string Password { get; set; } = string.Empty;

        /// <summary>
        /// 登录IP
        /// </summary>
        public string? LoginIp { get; set; }

        /// <summary>
        /// 登录次数
        /// </summary>
        public int LoginCount { get; set; } = 0;

        /// <summary>
        /// 密码错误次数
        /// </summary>
        public int LoginErrorCount { get; set; } = 0;

        /// <summary>
        /// 是否被锁定
        /// </summary>
        public bool IsLocked { get; set; } = false;

        /// <summary>
        /// 角色
        /// </summary>
        public List<RolePO> Roles { get; set; } = new List<RolePO>();
    }
}
